﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class biaobai : MonoBehaviour
{
    // Start is called before the first frame update
    void Start()
    {
        Debug.Log("reba, i love u!");
    }

    // Update is called once per frame
    void Update()
    {
        if(Input.GetButtonDown("Fire1"))
       {
            //按下按键瞬间输出一次
           Debug.Log("Fire键按下");
       }
       if(Input.GetButton("Fire1"))
       {
              //按下按键，在松开前持续输出
              Debug.Log("按Fire键中");
       }
       if(Input.GetButtonUp("Fire1"))
       {
              //松开按键瞬间输出一次
              Debug.Log("Fire键被释放");
       }

	//获取水平轴数值，-1代表按了左方向键，1代表按了右方向键，0代表没有按键
	float horizontal =	Input.GetAxis("Horizontal");
	Debug.Log(horizontal);
    }
}
